package com.deyuanyun.pic.ctrl.service;

import com.deyuanyun.pic.ctrl.util.AutoImportInterface;
import com.deyuanyun.pic.settings.service.msgtemplate.ParamName;
import org.apache.ibatis.annotations.Param;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;

/**
 * 模块描述
 *
 * @author scalpel.王敏
 * @version [v1.0] 创建时间（2016/9/19）
 * @see // 引用的类
 * Method List:
 * 1.----------------
 * 2.----------------
 * History:
 */
public interface ImportService {

    /**
     *
     * @param data 需要导入的数据信息
     * @param c 导入的业务数据类
     * @return
     * @throws NoSuchMethodException
     * @throws IllegalAccessException
     * @throws InstantiationException
     * @throws InvocationTargetException
     * @throws ParseException
     */
    boolean saveImportData(@ParamName("data") List<? extends AutoImportInterface> data, @ParamName("c") Class c) throws NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException, ParseException;

    /**
     * 查询附近测试桩
     * @param mileage 绝对距离
     * @return
     */
    HashMap<String,Object> queryNagm(String pipeLineId, String mileage);


    /**
     * 根据漏损的编号查询漏损点
     * @param pipeLineId
     * @param customNumber
     * @return
     */
    HashMap<String,Object> queryOclpointByCustomNumber(String pipeLineId, String customNumber);
    Long queryOclpointByCustomNumberCount(String customNumber);


    /**
     *
     * @param data
     *              id:主键
     *              baseid：业务数据ID
     *              table：对象表
     *              data：业务数据
     * @throws IOException
     */
    void inserMiorData(HashMap data) throws IOException;

    Double queryAcSoilResistivity(String baseId);

    String  queryTestStationId(String type,String baseId);

    String queryAcOrDc(String type, String baseId);

    String queryInspLineId(String taskId);

}
